<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>多彩主题背景切换</title>
<style>
    body {
        background: url(bg_images/c1.jpg) no-repeat center center/cover;
    }
    .container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin: 120px auto;
        width: 760px;
        padding: 12px;
        background: rgba(255,255,255,0.5);
    }
    img {
        width: 140px;
        height: 190px;
        border-radius: 10px;
        cursor: pointer;
        opacity: 0.85;
        transition: opacity 0.3s, transform 0.3s;
    }
    img:hover {
        opacity: 1;
        transform: scale(1.1);
    }
</style>
</head>
<body>
    <div class="container">
        <img src="bg_images/c1.jpg" alt="">
        <img src="bg_images/c2.jpg" alt="">
        <img src="bg_images/c3.jpeg" alt="">
        <img src="bg_images/c4.jpg" alt="">
    </div>
<script>
    Array.from(document.querySelectorAll('.container img')).map(img => {
        img.onclick = function() {
            document.body.style.backgroundImage = `url(${this.src})`;
        }
    });
</script>
</body>
</html>
